﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace LibraryManagementSystem
{
    public abstract class  ViewClassCheckInputValue
    {
        protected int InputInt()
        {
            string A = Console.ReadLine().Trim();
            if (A == null || A == "")
            {
                return 0;
            }
            int I;
            try
            {
                I = int.Parse(A);
            }
            catch
            {
                return 0;
            }
            return I;
        }

        protected int InputInt(string B)
        {
            Console.WriteLine(B);
            string A = Console.ReadLine().Trim();
            if (A == null || A == "")
            {
                return 0;
            }
            int I;
            try
            {
                I = int.Parse(A);
            }
            catch
            {
                return 0;
            }
            return I;
        }

        protected string InputString()
        {
            string RTST = Console.ReadLine().Trim();
            return RTST;
        }

        protected string InputString(string A) 
        {
            Console.WriteLine(A);
            string RTST = Console.ReadLine().Trim();
            return RTST;
        }

        protected void PromptWait(string A)
        {
            Console.WriteLine(A);
            Console.ReadKey();
        }

    }
}
